home *** CD-ROM | disk | FTP | other *** search
- on legalButton whichSprite
- if whichSprite > 0 then
- repeat while the mouseDown
- updateStage()
- end repeat
- if rollOver(whichSprite) then
- return 1
- else
- return 0
- end if
- end if
- end
-
- on invertButton whichSprite
- puppetTransition(0)
- set oldInk to the ink of sprite whichSprite
- set the ink of sprite whichSprite to 4
- updateStage()
- delayFor(20)
- repeat while the stillDown
- if rollOver(whichSprite) then
- set the ink of sprite whichSprite to 4
- else
- set the ink of sprite whichSprite to oldInk
- end if
- updateStage()
- end repeat
- if the ink of sprite whichSprite = oldInk then
- return 0
- exit
- end if
- set the ink of sprite whichSprite to oldInk
- return 1
- end
-
- on pressButton whichSprite, ignoreRollOver
- set the loc of sprite whichSprite to point(the locH of sprite whichSprite + 1, the locV of sprite whichSprite + 1)
- updateStage()
- set the loc of sprite whichSprite to point(the locH of sprite whichSprite + 1, the locV of sprite whichSprite + 1)
- updateStage()
- set delayFor to the timer + 20
- repeat while the mouseDown or (the timer < delayFor)
- nothing()
- end repeat
- if voidp(ignoreRollOver) then
- set theResult to rollOver(whichSprite)
- else
- set theResult to ignoreRollOver
- end if
- set the loc of sprite whichSprite to point(the locH of sprite whichSprite - 1, the locV of sprite whichSprite - 1)
- updateStage()
- set the loc of sprite whichSprite to point(the locH of sprite whichSprite - 1, the locV of sprite whichSprite - 1)
- updateStage()
- return theResult
- end
-